package com.meirengu.webview.controller;

import com.meirengu.channel.service.*;
import com.meirengu.common.StatusCode;
import com.meirengu.model.Result;
import com.meirengu.utils.DateUtils;
import com.meirengu.utils.NumberUtil;
import com.meirengu.webview.dao.KwInterfaceConfigDao;
import com.meirengu.webview.model.*;
import com.meirengu.webview.service.*;
import com.meirengu.webview.utils.UserAgentRandomUtil;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.math.BigDecimal;
import java.util.*;

import static com.meirengu.common.StatusCode.*;
import static com.meirengu.utils.DateUtils.dateFormat;
import static java.util.Calendar.*;
import static org.apache.commons.lang3.StringUtils.*;


/**
 * ${DESCRIPTION}
 *
 * @author Mao
 * @create 2017-12-19 12:27
 */
@Controller
@RequestMapping("hand")
public class HandController extends BaseController {

    @Autowired
    UserInfoService userInfoService;
    @Autowired
    UserService userService;
    @Autowired
    KwUserErrorService kwUserErrorService;
    @Autowired
    PingAnService pingAnService;
    @Autowired
    KwUserChannelService kwUserChannelService;
    @Autowired
    private KwDfrzFilterService kwDfrzFilterService;
    @Autowired
    KwThirdbackService kwThirdbackService;
    @Autowired
    KwInterfaceRetryService kwInterfaceRetryService;
    @Autowired
    PACAService pacaService;
    @Autowired
    NiWoDaiService niWoDaiService;
    @Autowired
    HouBankService houBankService;
    @Autowired
    YiCaiDaoService yiCaiDaoService;
    @Autowired
    KwOperationLogService kwOperationLogService;
    @Autowired
    private KwXbbPushService kwXbbPushService;
    @Autowired
    private KwXbbFilterService kwXbbFilterService;
    @Autowired
    private KwFjsFilterService kwFjsFilterService;
    @Autowired
    private KwCcicFilterService kwCcicFilterService;
    @Autowired
    private KwPpdFilterService kwPpdFilterService;
    @Autowired
    private KwCyphFilterService kwCyphFilterService;
    @Autowired
    private KwCyphPushService kwCyphPushService;
    @Autowired
    private KwYcdFilterService kwYcdFilterService;
    @Autowired
    private KwYcdPushService kwYcdPushService;
    @Autowired
    private KwXxjrFilterService kwXxjrFilterService;
    @Autowired
    private KwZhudaiFilterService kwZhudaiFilterService;
    @Autowired
    private KwAydFilterService kwAydFilterService;
    @Autowired
    private KwAydPushService kwAydPushService;
    @Autowired
    private KwWeidaiFilterService kwWeidaiFilterService;
    @Autowired
    private KwHnbFilterService kwHnbFilterService;
    @Autowired
    private KwHnbPushService kwHnbPushService;
    @Autowired
    private KwHnbPushLogService kwHnbPushLogService;
    @Autowired
    private KwPpdPushService kwPpdPushService;
    @Autowired
    public KwXbbPushLogService kwXbbPushLogService;

    @Autowired
    private LmUserBaseService lmUserBaseService;
    @Autowired
    private LmUserService lmUserService;
    @Autowired
    private ProductQualificationService productQualificationService;
    @Autowired
    private KwInterfaceConfigDao kwInterfaceConfigDao;

    Logger logger = LoggerFactory.getLogger(HandController.class);


    /**
     * ,
     * 手工发送春雨赠险未完善
     */
    @ResponseBody
    @RequestMapping("/handCYZXWWS")
    public Result handCYZXWWS(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                              @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        try {
            List<Map<String, Object>> userList = userService.getList(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handCYZXWWS",
                    "手工发送春雨赠险未完善", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                    null, null, null);
            if (userList != null && userList.size() > 0) {
                for (Map<String, Object> userMap : userList) {
                    String id = userMap.get("id").toString();
                    if (userMap.get("name") != null) {
                        UserInfo userInfo = userInfoService.getByUserId(id);
                        if (userInfo == null) {
                            //校验是否有发送成功的记录
                            Map<String, Object> params = new HashMap<>();
                            params.put("interfaceCode", "pinganzx");
                            params.put("mobile", userMap.get("mobile").toString());
                            params.put("code", 1);
                            List<Map<String, Object>> existThirdback = kwThirdbackService.getList(params);
                            //已有成功发送记录
                            if (existThirdback != null && existThirdback.size() > 0) {
                                continue;
                            }
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                            if (userMap.get("birthday") != null) {
                                user.setBirthday((Date) (userMap.get("birthday")));
                                userInfoService.sendCYZXWWS(user);
                            }
                        }
                    }

                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送平安赠险数据
     */
    @ResponseBody
    @RequestMapping("/handPingAnZenXian")
    public Result handPingAnZenXian(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                    @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {

        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handPingAnZenXian",
                "手工发送平安赠险数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendPingAnZX(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送新旦保险2数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @return
     * @throws Exception
     */

    @ResponseBody
    @RequestMapping("/handXbb2")
    public Result handXbb2(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }
            List<Map<String, Object>> userList = userService.getList(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "sendXbb2",
                    "手工发送xbb2数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                    null, null, null);
            if (userList != null && userList.size() > 0) {
                for (Map<String, Object> userMap : userList) {
                    String id = userMap.get("id").toString();
                    if (userMap.get("name") != null) {
                        UserInfo userInfo = userInfoService.getByUserId(id);
                        if (userInfo != null && isNotBlank(userInfo.getId())) {
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                            if (userMap.get("userAgent") == null || isBlank(userMap.get("userAgent").toString())) {
                                user.setUserAgent(UserAgentRandomUtil.random());
                            } else {
                                user.setUserAgent(userMap.get("userAgent").toString());
                            }
                            userInfo.setCreateDate(new Date());
                            kwXbbFilterService.sendXbbForPingan(userInfo, user);
                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            String params = "";
            logger.error(">>handController.handXbb2 throw exception: {} happens. params:{}.", ExceptionUtils.getFullStackTrace(e), params);
            return super.setResult(StatusCode.INTERNAL_SERVER_ERROR, null, codeMsgMap.get(StatusCode.INTERNAL_SERVER_ERROR));

        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送第三方数据新旦3接口
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @return
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handThirdChannelXbb3")
    public Result handThirdChannelXbb3(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                       @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }
            List<LmUser> userList = lmUserService.getModel(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handThirdChannelXbb3",
                    "手工发送第三方数据新旦3接口", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                    null, null, null);
            if (userList.size() > 0) {
                A:
                for (LmUser lmUser : userList) {
                    if (isNotBlank(lmUser.getName()) && isNotBlank(lmUser.getPhone())) {
                        Map<String, Object> baseMap = new HashMap<>();
                        baseMap.put("userId", lmUser.getId());
                        List<LmUserBase> list = lmUserBaseService.getModel(baseMap);
                        if (list.size() == 1) {
                            String channelCode = list.get(0).getChannelCode();
                            if ("dp_cy_001".equals(channelCode) || "dp_cy_002".equals(channelCode)) {
                                continue A;
                            }
                        }
                        lmUser.setCreateDate(new Date());
                        kwXbbFilterService.sendXbb3ByModel(lmUser);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            String params = "";
            logger.error(">>handController.handThirdChannelXbb3 throw exception: {} happens. params:{}.", ExceptionUtils.getFullStackTrace(e), params);
            return super.setResult(StatusCode.INTERNAL_SERVER_ERROR, null, codeMsgMap.get(StatusCode.INTERNAL_SERVER_ERROR));

        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送第三方数据新旦接口
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @return
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handThirdChannelXbb")
    public Result handThirdChannelXbb(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                      @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }
            List<LmUser> userList = lmUserService.getModel(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handThirdChannelXbb",
                    "手工发送第三方数据新旦接口", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                    null, null, null);
            if (userList.size() > 0) {
                A:
                for (LmUser lmUser : userList) {
                    if (isNotBlank(lmUser.getName()) && isNotBlank(lmUser.getPhone())) {
                        Map<String, Object> baseMap = new HashMap<>();
                        baseMap.put("userId", lmUser.getId());
                        List<LmUserBase> list = lmUserBaseService.getModel(baseMap);
                        if (list.size() == 1) {
                            String channelCode = list.get(0).getChannelCode();
                            if ("dp_cy_001".equals(channelCode) || "dp_cy_002".equals(channelCode)) {
                                continue A;
                            }
                        }
                        lmUser.setCreateDate(new Date());
                        kwXbbFilterService.sendMdzjXbb(lmUser);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            String params = "";
            logger.error(">>handController.handThirdChannelXbb throw exception: {} happens. params:{}.", ExceptionUtils.getFullStackTrace(e), params);
            return super.setResult(StatusCode.INTERNAL_SERVER_ERROR, null, codeMsgMap.get(StatusCode.INTERNAL_SERVER_ERROR));

        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送第三方数据熠巨方正接口
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @return
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handMdzjYiJuFz")
    public Result handMdzjYiJuFz(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                 @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }
            List<LmUser> userList = lmUserService.getModel(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handMdzjYiJuFz",
                    "手工发送第三方数据熠巨方正接口", createTimeBegin, createTimeEnd, "lm_user", userList.size(),
                    null, null, null);
            if (userList.size() > 0) {
                A:
                for (LmUser lmUser : userList) {
                    if (isNotBlank(lmUser.getName()) && isNotBlank(lmUser.getPhone())) {
                        Map<String, Object> baseMap = new HashMap<>();
                        baseMap.put("userId", lmUser.getId());
                        List<LmUserBase> list = lmUserBaseService.getModel(baseMap);
                        if (list.size() == 1) {
                            String channelCode = list.get(0).getChannelCode();
                            if ("dp_cy_001".equals(channelCode) || "dp_cy_002".equals(channelCode)) {
                                continue A;
                            }
                        }
                        lmUser.setCreateDate(new Date());
                        kwFjsFilterService.sendMdzjYiJuFz(lmUser);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            String params = "";
            logger.error(">>handController.handMdzjYiJuFz throw exception: {} happens. params:{}.", ExceptionUtils.getFullStackTrace(e), params);
            return super.setResult(StatusCode.INTERNAL_SERVER_ERROR, null, codeMsgMap.get(StatusCode.INTERNAL_SERVER_ERROR));

        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送平安普惠数据
     */
    @ResponseBody
    @RequestMapping("/handPingAnPuHui")
    public Result handPingAnPuHui(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                  @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handPingAnPuHui",
                "手工发送平安普惠数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendPuHui(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送平安新一贷数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handPACA")
    public Result handPACA(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handPACA",
                "手工发送平安新一贷数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendPcac(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送东方融资网数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handEastRongzi")
    public Result handEastRongzi(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                 @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handEastRongzi",
                "手工发送东方融资网数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwDfrzFilterService.sendEastFinance(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送你我贷数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handYouAndMe")
    public Result handYouAndMe(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                               @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handYouAndMe",
                "手工发送你我贷数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendNiwodai(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送中腾信数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handZTX")
    public Result handZTX(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                          @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handZTX",
                "手工发送一财道中腾信数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwYcdFilterService.sendZTX(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送中腾信数据2
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handZTX2")
    public Result handZTX2(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handZTX2",
                "手工发送一财道中腾信社保加车数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    String mobile = userMap.get("mobile").toString();
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        //有社保，有车
                        if (userInfo.getSocialSecurity().intValue() != 0 && userInfo.getCar().intValue() != 1) {
                            //校验是否有发送成功的记录
                            Map<String, Object> params = new HashMap<>();
                            params.put("interfaceCode", "ycdctc");
                            params.put("mobile", mobile);
                            //params.put("code", 1);
                            List<Map<String, Object>> existYcdctcPushList = kwYcdPushService.getList(params);
                            //已有成功发送记录
                            if (existYcdctcPushList != null && existYcdctcPushList.size() > 0) {
                                continue;
                            }
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                            kwYcdFilterService.sendZTX(userInfo, user);
                        }

                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送中腾信官方2
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handCTC2")
    public Result handCTC2(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handZTX2",
                "手工发送中腾信官方社保加车数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    String mobile = userMap.get("mobile").toString();
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        //有社保，有车
                        if (userInfo.getSocialSecurity().intValue() != 0 && userInfo.getCar().intValue() != 1) {
                            //校验是否有发送成功的记录
                            Map<String, Object> params = new HashMap<>();
                            params.put("interfaceCode", "ZTX");
                            params.put("mobile", mobile);
                            //params.put("code", 1);
                            List<Map<String, Object>> existThirdback = kwThirdbackService.getList(params);
                            //已有成功发送记录
                            if (existThirdback != null && existThirdback.size() > 0) {
                                continue;
                            }


                            Map<String, Object> ctcparams = new HashMap<>();
                            ctcparams.put("interfaceCode", "ctc");
                            ctcparams.put("mobile", mobile);
                            //params.put("code", 1);
                            List<Map<String, Object>> existctcThirdback = kwThirdbackService.getList(ctcparams);
                            //已有成功发送记录
                            if (existctcThirdback != null && existctcThirdback.size() > 0) {
                                continue;
                            }
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                            userInfoService.sendChinatopcredit(userInfo, user);
                        }

                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送厚本金融数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handHouBank")
    public Result handHouBank(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                              @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handHouBank",
                "手工发送厚本金融数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendHouBank(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送助贷数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handZhuDai")
    public Result handZhuDai(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                             @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd,
                             @RequestParam(value = "city", required = false) String city) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handZhuDai",
                "手工发送助贷数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            KwInterfaceConfig kwInterfaceConfig = kwInterfaceConfigDao.findByCode("zhudai");
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {

                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        String areaName = userInfo.getAreaName().replace("市", "");
                        String cityRange = kwInterfaceConfig.getAreaValue();
                        if (cityRange.contains(areaName)) {
                            String mobile = userMap.get("mobile").toString();
                            //校验是否有成功推送接口的记录
                            Map<String, Object> params = new HashMap<>();
                            params.put("mobile", mobile);
                            params.put("code", 1);
                            Integer count = kwZhudaiFilterService.getCount(params);
                            //已有推送记录
                            if (!NumberUtil.isNullOrZero(count)) {
                                continue;
                            }
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                            //获取上一天时间
                            long timemillis = DateUtils.getYesRanTime();
                            userInfo.setCreateDate(new Date(timemillis));
                            kwZhudaiFilterService.sendZhuDai(userInfo, user);
                        }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送房金所数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handFangGold")
    public Result handFangGold(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                               @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handFangGold",
                "手工发送房金所数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    String mobile = userMap.get("mobile").toString();
                    //校验是否有推送接口的记录
                    Map<String, Object> params = new HashMap<>();
                    params.put("mobile", mobile);
                    Integer count = kwFjsFilterService.getCount(params);
                    //已有推送记录
                    if (!NumberUtil.isNullOrZero(count)) {
                        continue;
                    }
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwFjsFilterService.sendFangGold(userInfo, user);
                    }
                }


            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送贷上我数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handWithMe")
    public Result handWithMe(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                             @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handWithMe",
                "手工发送贷上我数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwXxjrFilterService.sendWithMe(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送新旦数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handXbb")
    public Result handXbb(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                          @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handXbb",
                "手工发送新旦数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        if (userMap.get("userAgent") == null || isBlank(userMap.get("userAgent").toString())) {
                            user.setUserAgent(UserAgentRandomUtil.random());
                        } else {
                            user.setUserAgent(userMap.get("userAgent").toString());
                        }
                        //校验是否有发送成功的记录
                        Map<String, Object> xbbparams = new HashMap<>();
                        xbbparams.put("interfaceCode", "xbb");
                        xbbparams.put("mobile", user.getMobile());
                        xbbparams.put("code", 1);
                        Integer xbbPushCount = kwXbbPushService.getCount(xbbparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(xbbPushCount)) {
                            continue;
                        }

                        //校验是否有发送畅愿保险的记录
                        Map<String, Object> cyparams = new HashMap<>();
                        cyparams.put("interfaceCode", "cyis");
                        cyparams.put("mobile", user.getMobile());
                        cyparams.put("code", 1);
                        Integer cyphPushCount = kwCyphPushService.getCount(cyparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(cyphPushCount)) {
                            continue;
                        }

                        //校验是否有发送黑牛成功的记录
                        Map<String, Object> hnbparams = new HashMap<>();
                        hnbparams.put("mobile", user.getMobile());
                        hnbparams.put("code", 1);
                        Integer hnbpushCount = kwHnbPushService.getCount(hnbparams);
                        if (!NumberUtil.isNullOrZero(hnbpushCount)) {
                            continue;
                        }
                        kwXbbFilterService.sendXbb(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送新旦3数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handXbb3")
    public Result handXbb3(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handXbb3",
                "手工发送新旦3数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        if (userMap.get("userAgent") == null || isBlank(userMap.get("userAgent").toString())) {
                            user.setUserAgent(UserAgentRandomUtil.random());
                        } else {
                            user.setUserAgent(userMap.get("userAgent").toString());
                        }
                       /* //校验是否有发送成功的记录
                        Map<String, Object> xbbparams = new HashMap<>();
                        xbbparams.put("interfaceCode", "xbb");
                        xbbparams.put("mobile", user.getMobile());
                        xbbparams.put("code", 1);
                        Integer xbbPushCount = kwXbbPushService.getCount(xbbparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(xbbPushCount)) {
                            continue;
                        }

                        //校验是否有发送成功的记录
                        Map<String, Object> xbb2params = new HashMap<>();
                        xbb2params.put("interfaceCode", "xbb2");
                        xbb2params.put("mobile", user.getMobile());
                        xbb2params.put("code", 1);
                        Integer xbb2PushCount = kwXbbPushService.getCount(xbb2params);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(xbb2PushCount)) {
                            continue;
                        }

                        //校验是否有发送畅愿保险的记录
                        Map<String, Object> cyparams = new HashMap<>();
                        cyparams.put("interfaceCode", "cyis");
                        cyparams.put("mobile", user.getMobile());
                        cyparams.put("code", 1);
                        Integer cyphPushCount = kwCyphPushService.getCount(cyparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(cyphPushCount)) {
                            continue;
                        }*/
                        kwXbbFilterService.sendXbb3(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送新旦数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handXbbForChuan")
    public Result handXbbForChun(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                 @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd,
                                 @RequestParam(value = "citys", required = true) String citys) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handXbbForChuan",
                "手工发送新旦数据四川", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, citys);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        if (isNotBlank(userInfo.getId())) {
                            if (citys.contains(userInfo.getScity())) {
                                User user = new User();
                                user.setId(id);
                                user.setName(userMap.get("name").toString());
                                user.setMobile(userMap.get("mobile").toString());
                                user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                                if (userMap.get("userAgent") == null) {
                                    user.setUserAgent(UserAgentRandomUtil.random());
                                }
                                //校验是否有发送成功的记录
                                Map<String, Object> xbbparams = new HashMap<>();
                                xbbparams.put("interfaceCode", "xbb");
                                xbbparams.put("mobile", user.getMobile());
                                xbbparams.put("code", 1);
                                Integer xbbPushCount = kwXbbPushService.getCount(xbbparams);
                                //已有成功发送记录
                                if (!NumberUtil.isNullOrZero(xbbPushCount)) {
                                    continue;
                                }
                                kwXbbFilterService.sendXbb(userInfo, user);
                            }
                        }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送新旦数据（赠险投保失败数据）
     *
     * @param idBegin
     * @param idEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handXbbFromError")
    public Result handXbbFromError(@RequestParam(value = "idBegin", required = true) Integer idBegin,
                                   @RequestParam(value = "idEnd", required = true) Integer idEnd) throws Exception {
        if (idBegin == null || idEnd == null) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (!NumberUtil.isNullOrZero(idBegin)) {
            map.put("idBegin", idBegin);
        }
        if (!NumberUtil.isNullOrZero(idEnd)) {
            map.put("idEnd", idEnd);
        }
        List<Map<String, Object>> kwUserErrorList = kwUserErrorService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handXbbFromError",
                "手工发送新旦数据（赠险投保失败数据）", null, null, "kw_user_error", kwUserErrorList.size(),
                null, null, idBegin + "--" + idEnd);
        if (kwUserErrorList != null && kwUserErrorList.size() > 0) {
            for (Map<String, Object> kwUserErrorMap : kwUserErrorList) {
                String mobile = kwUserErrorMap.get("mobile").toString();
                //查询用户基础表
                User user = userService.getByMobile(mobile);
                if (user != null && isNotBlank(user.getId())) {
                    UserInfo userInfo = userInfoService.getByUserId(user.getId());
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        logger.info("发送到新贝");
                        kwXbbFilterService.sendXbb(userInfo, user);
                    }
                } else {
                    logger.error("无此电话号的用户" + mobile);
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送新旦数据（春雨去重数据）
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @param code
     * @param message
     * @param interfaceCode
     * @return
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handXbbFromRepeat")
    public Result handXbbFromRepeat(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                    @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd,
                                    @RequestParam(value = "code", required = false) Integer code,
                                    @RequestParam(value = "message", required = false) String message,
                                    @RequestParam(value = "interfaceCode", required = false) String interfaceCode) throws Exception {
        //查找符合条件的接口发送记录
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        if (isNotBlank(interfaceCode)) {
            map.put("interfaceCode", interfaceCode);
        }
        if (code != null) {
            map.put("code", code);
        }
        if (isNotBlank(message)) {
            map.put("message", message);
        }
        List<Map<String, Object>> thirdbackList = kwThirdbackService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handXbbFromRepeat",
                "手工发送新旦数据（春雨去重数据）", createTimeBegin, createTimeEnd, "kw_thirdback", thirdbackList.size(),
                null, null, null);
        if (thirdbackList != null && thirdbackList.size() > 0) {
            logger.info("失败数据共:{}条", thirdbackList.size());
            for (Map<String, Object> thirdbackMap : thirdbackList) {
                String id = thirdbackMap.get("id").toString();
                String mobile = thirdbackMap.get("mobile").toString();
                //查找用户信息
                User user = userService.getByMobile(mobile);
                UserInfo userInfo = userInfoService.getByUserId(user.getId());
                //组装信息
                //组装接口数据
                if (userInfo != null && isNotBlank(userInfo.getId())) {
                    //校验是否有发送成功的记录
                    Map<String, Object> xbbparams = new HashMap<>();
                    xbbparams.put("interfaceCode", "xbb");
                    xbbparams.put("mobile", user.getMobile());
                    xbbparams.put("code", 1);
                    Integer xbbPushCount = kwXbbPushService.getCount(xbbparams);
                    //已有成功发送记录
                    if (!NumberUtil.isNullOrZero(xbbPushCount)) {
                        continue;
                    }
                    kwXbbFilterService.sendXbb(userInfo, user);
                }
            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送畅愿普惠数据（春雨普惠失败数据）
     *
     * @param idBegin
     * @param idEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handCyphFromError")
    public Result handCyphFromError(@RequestParam(value = "idBegin", required = true) Integer idBegin,
                                    @RequestParam(value = "idEnd", required = true) Integer idEnd,
                                    @RequestParam(value = "channelCode", required = true) String channelCode) throws Exception {
        if (idBegin == null || idEnd == null) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (!NumberUtil.isNullOrZero(idBegin)) {
            map.put("idBegin", idBegin);
        }
        if (!NumberUtil.isNullOrZero(idEnd)) {
            map.put("idEnd", idEnd);
        }
        if (isNotBlank(channelCode)) {
            map.put("channelCode", channelCode);
        }
        List<Map<String, Object>> kwUserErrorList = kwUserErrorService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCyphFromError",
                "手工发送畅愿普惠数据（春雨普惠失败数据）", null, null, "kw_user_error", kwUserErrorList.size(),
                null, null, null);
        if (kwUserErrorList != null && kwUserErrorList.size() > 0) {
            for (Map<String, Object> kwUserErrorMap : kwUserErrorList) {
                String mobile = kwUserErrorMap.get("mobile").toString();
                //查询用户基础表
                User user = userService.getByMobile(mobile);
                if (user != null && isNotBlank(user.getId())) {
                    UserInfo userInfo = userInfoService.getByUserId(user.getId());
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        //获取上一天时间
                        long timemillis = DateUtils.getYesRanTime();
                        userInfo.setCreateDate(new Date(timemillis));
                        logger.info("发送到畅愿普惠");
                        kwCyphFilterService.sendChangYuanpuhui(userInfo, user);
                    }
                } else {
                    logger.error("无此电话号的用户" + mobile);
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送西伊宜信数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handXYCreditEase")
    public Result handXYCreditEase(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                   @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handXYCreditEase",
                "手工发送西伊宜信数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendXYCreditEase(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送飞单宝数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handFeidan8")
    public Result handFeidan8(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                              @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handFeidan8",
                "手工发送飞单宝数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendFeidan8(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送安易贷数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handAyd")
    public Result handAyd(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                          @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handAyd",
                "手工发送安易贷数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        //if ("上海市，杭州市，长沙市".contains(userInfo.getScity())) {
                        //校验是否有安易贷1渠道和安易贷2渠道发送成功的记录
                        Map<String, Object> aydparams = new HashMap<>();
                        aydparams.put("mobile", userMap.get("mobile").toString());
                        aydparams.put("code", 1);
                        Integer aydPushCount = kwAydPushService.getCount(aydparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(aydPushCount)) {
                            continue;
                        }
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        user.setCreateDate(new Date());
                        kwAydFilterService.sendAnyidai(userInfo, user);
                        //  }

                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送安易贷2数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handAyd2")
    public Result handAyd2(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handAyd2",
                "手工发送安易贷2数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        //       if ("上海市，杭州市，长沙市".contains(userInfo.getScity())) {
                        //校验是否有安易贷1渠道和安易贷2渠道发送成功的记录
                        Map<String, Object> aydparams = new HashMap<>();
                        aydparams.put("mobile", userMap.get("mobile").toString());
                        aydparams.put("code", 1);
                        Integer aydPushCount = kwAydPushService.getCount(aydparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(aydPushCount)) {
                            continue;
                        }
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        user.setCreateDate(new Date());
                        kwAydFilterService.sendAnyidai2(userInfo, user);
                        //       }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送安易贷3数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handAyd3")
    public Result handAyd3(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handAyd3",
                "手工发送安易贷3数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        //       if ("上海市，杭州市，长沙市".contains(userInfo.getScity())) {
                        //校验是否有安易贷1渠道和安易贷2渠道发送成功的记录
                        Map<String, Object> aydparams = new HashMap<>();
                        aydparams.put("mobile", userMap.get("mobile").toString());
                        aydparams.put("code", 1);
                        Integer aydPushCount = kwAydPushService.getCount(aydparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(aydPushCount)) {
                            continue;
                        }
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        user.setCreateDate(new Date());
                        kwAydFilterService.sendAnyidai3(userInfo, user);
                        //       }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送畅愿普惠数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handCyph")
    public Result handCyph(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCyph",
                "手工发送畅愿普惠数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));

                        //校验是否有发送畅愿成功的记录
                        Map<String, Object> cyparams = new HashMap<>();
                        cyparams.put("interfaceCode", "cyph");
                        cyparams.put("mobile", user.getMobile());
                        cyparams.put("code", 1);
                        Integer cyphPushCount = kwCyphPushService.getCount(cyparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(cyphPushCount)) {
                            continue;
                        }

                        //获取上一天时间
                        long timemillis = DateUtils.getYesRanTime();
                        userInfo.setCreateDate(new Date(timemillis));
                        kwCyphFilterService.sendChangYuanpuhui(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送畅愿普惠数据:严格条件
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handCyphStrict")
    public Result handCyphStrict(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                 @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCyphStrict",
                "手工发送畅愿普惠数据:严格条件", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        if (userInfo.getHouse().intValue() != 1 ||
                                userInfo.getCar().intValue() != 1 ||
                                userInfo.getPolicy().intValue() != 1) {
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));

                            //校验是否有发送畅愿成功的记录
                            Map<String, Object> cyparams = new HashMap<>();
                            cyparams.put("interfaceCode", "cyph");
                            cyparams.put("mobile", user.getMobile());
                            Integer cyphPushCount = kwCyphPushService.getCount(cyparams);
                            //已有成功发送记录
                            if (!NumberUtil.isNullOrZero(cyphPushCount)) {
                                continue;
                            }

                            //校验是否有发送壹财道成功的记录
                            Map<String, Object> ycdphparams = new HashMap<>();
                            ycdphparams.put("interfaceCode", "ycdph");
                            ycdphparams.put("mobile", user.getMobile());
                            ycdphparams.put("code", 1);
                            Integer ycdphPushCount = kwYcdPushService.getCount(ycdphparams);
                            //已有成功发送记录
                            if (!NumberUtil.isNullOrZero(ycdphPushCount)) {
                                continue;
                            }

                            Map<String, Object> hnbparams = new HashMap<>();
                            hnbparams.put("mobile", user.getMobile());
                            hnbparams.put("code", 1);
                            Integer hnbPushCount = kwHnbPushService.getCount(hnbparams);
                            if (!NumberUtil.isNullOrZero(hnbPushCount)) {
                                continue;
                            }

                            //获取上一天时间
                            long timemillis = DateUtils.getYesRanTime();
                            userInfo.setCreateDate(new Date(timemillis));
                            kwCyphFilterService.sendChangYuanpuhui(userInfo, user);
                        }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送畅愿普惠数据:渠道2
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handCyphStrict2")
    public Result handCyphStrict2(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                  @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCyphStrict",
                "手工发送畅愿普惠数据:渠道2", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        if (userInfo.getHouse().intValue() != 1 ||
                                userInfo.getCar().intValue() != 1 ||
                                userInfo.getPolicy().intValue() != 1) {
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));

                            //校验是否有发送畅愿成功的记录
                            Map<String, Object> cyparams = new HashMap<>();
                            cyparams.put("interfaceCode", "cyph");
                            cyparams.put("mobile", user.getMobile());
                            Integer cyphPushCount = kwCyphPushService.getCount(cyparams);
                            //已有成功发送记录
                            if (!NumberUtil.isNullOrZero(cyphPushCount)) {
                                continue;
                            }
                            //校验是否有发送畅愿2成功的记录
                            Map<String, Object> cy2params = new HashMap<>();
                            cy2params.put("interfaceCode", "cyph2");
                            cy2params.put("mobile", user.getMobile());
                            Integer cyph2PushCount = kwCyphPushService.getCount(cy2params);
                            //已有成功发送记录
                            if (!NumberUtil.isNullOrZero(cyph2PushCount)) {
                                continue;
                            }

                            //校验是否有发送壹财道成功的记录
                            Map<String, Object> ycdphparams = new HashMap<>();
                            ycdphparams.put("interfaceCode", "ycdph");
                            ycdphparams.put("mobile", user.getMobile());
                            ycdphparams.put("code", 1);
                            Integer ycdphPushCount = kwYcdPushService.getCount(ycdphparams);
                            //已有成功发送记录
                            if (!NumberUtil.isNullOrZero(ycdphPushCount)) {
                                continue;
                            }

                            Map<String, Object> hnbparams = new HashMap<>();
                            hnbparams.put("mobile", user.getMobile());
                            hnbparams.put("code", 1);
                            Integer hnbPushCount = kwHnbPushService.getCount(hnbparams);
                            if (!NumberUtil.isNullOrZero(hnbPushCount)) {
                                continue;
                            }

                            //获取上一天时间
                            long timemillis = DateUtils.getYesRanTime();
                            userInfo.setCreateDate(new Date(timemillis));
                            kwCyphFilterService.sendChangYuanpuhui2(userInfo, user);
                        }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送畅愿阳光数据:阳光
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handCysunStrict")
    public Result handCysunStrict(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                  @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCysunStrict",
                "手工发送畅愿阳光数据:阳光", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        //校验是否有畅愿阳光发送成功记录
                        Map<String, Object> cyygparams = new HashMap<>();
                        cyygparams.put("interfaceCode", "cyyg");
                        cyygparams.put("mobile", user.getMobile());
                        Integer cyygPushCount = kwCyphPushService.getCount(cyygparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(cyygPushCount)) {
                            continue;
                        }
                        //获取上一天时间
                        long timemillis = DateUtils.getYesRanTime();
                        userInfo.setCreateDate(new Date(timemillis));
                        kwCyphFilterService.sendChangyuanSun(userInfo, user);

                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送畅愿普惠数据:一财道普惠单房贷失败数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handCyphYCDError")
    public Result handCyphYCDError(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                   @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd,
                                   @RequestParam(value = "interfaceCode", required = true) String interfaceCode,
                                   @RequestParam(value = "code", required = true) String code,
                                   @RequestParam(value = "message", required = true) String message) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        if (isNotBlank(interfaceCode)) {
            map.put("interfaceCode", interfaceCode);
        }
        if (isNotBlank(code)) {
            map.put("code", code);
        }
        if (isNotBlank(message)) {
            map.put("message", message);
        }
        List<Map<String, Object>> thirdbackList = kwThirdbackService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCyphYCDError",
                "手工发送畅愿普惠数据:一财道普惠单房贷失败数据", createTimeBegin, createTimeEnd, "kw_thirdback", thirdbackList.size(),
                code, message, null);
        if (thirdbackList != null && thirdbackList.size() > 0) {
            for (Map<String, Object> thirdbackMap : thirdbackList) {
                String id = thirdbackMap.get("id").toString();
                String mobile = thirdbackMap.get("mobile").toString();
                //查找用户信息
                User user = userService.getByMobile(mobile);
                UserInfo userInfo = userInfoService.getByUserId(user.getId());
                if (userInfo != null && isNotBlank(userInfo.getId())) {
                    /*之前的三其一是，有房，有车，有保单，现在的三其一是有房贷，有车无贷，有保单*/
                    if (userInfo.getHouse().intValue() == 2 ||
                            userInfo.getCar().intValue() == 3 ||
                            userInfo.getPolicy().intValue() != 1) {

                        //校验是否有发送畅愿成功的记录
                        Map<String, Object> cyparams = new HashMap<>();
                        cyparams.put("interfaceCode", "cyph");
                        cyparams.put("mobile", user.getMobile());
                        Integer cyphPushCount = kwCyphPushService.getCount(cyparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(cyphPushCount)) {
                            continue;
                        }


                        //校验是否有发送壹财道成功的记录
                        Map<String, Object> ycdphparams = new HashMap<>();
                        ycdphparams.put("interfaceCode", "ycdph");
                        ycdphparams.put("mobile", user.getMobile());
                        /*ycdphparams.put("code", 1);*/
                        List<Map<String, Object>> existYcdphPushList = kwYcdPushService.getList(ycdphparams);
                        //已有成功发送记录
                        if (existYcdphPushList != null && existYcdphPushList.size() > 0) {
                            continue;
                        }

                        //获取上一天时间
                        long timemillis = DateUtils.getYesRanTime();
                        userInfo.setCreateDate(new Date(timemillis));
                        kwCyphFilterService.sendChangYuanpuhui(userInfo, user);
                    }
                }
            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送壹财道普惠数据:严格条件
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handYCDPHStrict")
    public Result handYCDPHStrict(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                  @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handYCDPHStrict",
                "手工发送壹财道普惠数据:严格条件", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));

                        //校验是否有发送畅愿成功的记录
                        Map<String, Object> cyparams = new HashMap<>();
                        cyparams.put("interfaceCode", "cyph");
                        cyparams.put("mobile", user.getMobile());
                        cyparams.put("code", 1);
                        Integer cyphPushCount = kwCyphPushService.getCount(cyparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(cyphPushCount)) {
                            continue;
                        }

                        //校验是否有发送畅愿2成功的记录
                        Map<String, Object> cy2params = new HashMap<>();
                        cy2params.put("interfaceCode", "cyph2");
                        cy2params.put("mobile", user.getMobile());
                        cy2params.put("code", 1);
                        Integer cyph2PushCount = kwCyphPushService.getCount(cy2params);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(cyph2PushCount)) {
                            continue;
                        }

                        //校验是否有发送壹财道的记录(普惠和中腾信都在一个表中)
                        Map<String, Object> ycdparams = new HashMap<>();
                        ycdparams.put("mobile", user.getMobile());
                        ycdparams.put("code", 1);
                        Integer ycdPushCount = kwYcdPushService.getCount(ycdparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(ycdPushCount)) {
                            continue;
                        }

                        //校验是否有发送黑牛成功的记录
                        Map<String, Object> hnbparams = new HashMap<>();
                        hnbparams.put("mobile", user.getMobile());
                        hnbparams.put("code", 1);
                        Integer hnbpushCount = kwHnbPushService.getCount(hnbparams);
                        if (!NumberUtil.isNullOrZero(hnbpushCount)) {
                            continue;
                        }

                        //获取上一天时间
                        long timemillis = DateUtils.getYesRanTime();
                        userInfo.setCreateDate(new Date(timemillis));
                        kwYcdFilterService.sendYCDPH(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送平安普惠数据:严格条件
     */
    @ResponseBody
    @RequestMapping("/handPingAnPuHuiStrict")
    public Result handPingAnPuHuiStrict(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                        @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handPingAnPuHuiStrict",
                "手工发送平安普惠数据:严格条件", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        if (userInfo.getHouse().intValue() != 1 || userInfo.getCar().intValue() != 1 || userInfo.getPolicy().intValue() != 1) {
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));

                            //校验是否有发送春雨成功的记录
                            Map<String, Object> params = new HashMap<>();
                            params.put("interfaceCode", "pinganph");
                            params.put("mobile", user.getMobile());
                            params.put("code", 1);
                            List<Map<String, Object>> existThirdback = kwThirdbackService.getList(params);
                            //已有成功发送记录
                            if (existThirdback != null && existThirdback.size() > 0) {
                                continue;
                            }
                            //校验是否有发送畅愿普惠成功的记录
                            Map<String, Object> cyparams = new HashMap<>();
                            cyparams.put("interfaceCode", "cyph");
                            cyparams.put("mobile", user.getMobile());
                            cyparams.put("code", 1);
                            List<Map<String, Object>> cyexistThirdback = kwThirdbackService.getList(cyparams);
                            //已有成功发送记录
                            if (cyexistThirdback != null && cyexistThirdback.size() > 0) {
                                continue;
                            }

                            //校验是否有发送壹财道成功的记录
                            Map<String, Object> ycdphparams = new HashMap<>();
                            ycdphparams.put("interfaceCode", "ycdph");
                            ycdphparams.put("mobile", user.getMobile());
                            ycdphparams.put("code", 1);
                            List<Map<String, Object>> ycdphexistThirdback = kwThirdbackService.getList(ycdphparams);
                            //已有成功发送记录
                            if (ycdphexistThirdback != null && ycdphexistThirdback.size() > 0) {
                                continue;
                            }
                            userInfoService.sendPuHui(userInfo, user);
                        }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送大地保险数据
     */
    @ResponseBody
    @RequestMapping("/handCcic")
    public Result handCcic(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCcic",
                "手工发送大地保险数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    //校验是否有大地贷发送成功的记录
                    Map<String, Object> ccicparams = new HashMap<>();
                    ccicparams.put("mobile", userMap.get("mobile").toString());
                    ccicparams.put("code", 1);


                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        //获取上一天时间
                        long timemillis = DateUtils.getYesRanTime();
                        userInfo.setCreateDate(new Date(timemillis));
                        kwCcicFilterService.sendCCIC(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送中腾信官方数据
     */
    @ResponseBody
    @RequestMapping("/handCtc")
    public Result handCtc(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                          @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCtc",
                "手工发送中腾信官方数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    //如果因为城市不符合的，返回
                    //如果因为年龄不符合的，返回
                    //如果因为已发送接口的，返回

                    boolean flag = true;

                    Map<String, Object> channelmap = new HashMap<>();
                    if (isNotBlank(createTimeBegin)) {
                        channelmap.put("mobile", userMap.get("mobile").toString());
                    }
                    if (isNotBlank(createTimeEnd)) {
                        channelmap.put("channelCode", "ctc");
                    }
                    List<Map<String, Object>> userchannelList = kwUserChannelService.getList(channelmap);
                    if (userchannelList != null && userchannelList.size() > 0) {
                        for (Map<String, Object> userchannelMap : userchannelList) {
                            if (userchannelMap.get("code") != null) {
                                Integer code = Integer.parseInt(userchannelMap.get("code").toString());
                                if (code.intValue() == 2 || code.intValue() == 3) {
                                    flag = false;
                                }
                            }
                        }
                    }

                    if (!flag) {
                        continue;
                    }

                    //校验是否有发送成功的记录
                    Map<String, Object> params = new HashMap<>();
                    params.put("interfaceCode", "ZTX");
                    params.put("mobile", userMap.get("mobile").toString());
                    //params.put("code", 1);
                    List<Map<String, Object>> existThirdback = kwThirdbackService.getList(params);
                    //已有成功发送记录
                    if (existThirdback != null && existThirdback.size() > 0) {
                        continue;
                    }


                    Map<String, Object> ctcparams = new HashMap<>();
                    ctcparams.put("interfaceCode", "ctc");
                    ctcparams.put("mobile", userMap.get("mobile").toString());
                    //params.put("code", 1);
                    List<Map<String, Object>> existctcThirdback = kwThirdbackService.getList(ctcparams);
                    //已有成功发送记录
                    if (existctcThirdback != null && existctcThirdback.size() > 0) {
                        continue;
                    }


                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendChinatopcredit(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送贷上我2渠道数据
     */
    @ResponseBody
    @RequestMapping("/handWithme2")
    public Result handWithme2(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                              @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handWithme2",
                "手工发送贷上我2渠道数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwXxjrFilterService.sendWithMe2(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送佳佳融渠道数据
     */
    @ResponseBody
    @RequestMapping("/jjr")
    public Result handJjr(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                          @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "hanjjr",
                "手工发送佳佳融渠道数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    Map<String, Object> hnbparams = new HashMap<>();
                    hnbparams.put("mobile", userMap.get("mobile").toString());
                   /* List<Map<String, Object>> filterList = kwHnbFilterService.getList(hnbparams);
                    if (filterList != null && filterList.size() > 0) {
                        continue;
                    }*/
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwHnbFilterService.sendJjr(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    @ResponseBody
    @RequestMapping("/kaisen")
    public Result handKaisen(@RequestParam(value = "createTimeBegin") String createTimeBegin,
                             @RequestParam(value = "createTimeEnd") String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handKaisen",
                "手工发送凯森渠道数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    Map<String, Object> hnbparams = new HashMap<>();
                    hnbparams.put("mobile", userMap.get("mobile").toString());
                   /* List<Map<String, Object>> filterList = kwHnbFilterService.getList(hnbparams);
                    if (filterList != null && filterList.size() > 0) {
                        continue;
                    }*/
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwCyphFilterService.sendKaisen(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    @ResponseBody
    @RequestMapping("/kaisen2")
    public Result handKaisen2(@RequestParam(value = "createTimeBegin", required = false) String createTimeBegin,
                              @RequestParam(value = "createTimeEnd", required = false) String createTimeEnd,
                              @RequestParam(value = "dayOff", required = false) Integer dayOff) throws Exception {

        if (isEmpty(createTimeBegin) || isEmpty(createTimeEnd)) {
            Calendar calendar = Calendar.getInstance();
            calendar.add(DAY_OF_MONTH, -dayOff);

            createTimeBegin = dateFormat.format(DateUtils.getDayBeginTime(calendar).getTime());
            createTimeEnd = dateFormat.format(DateUtils.getDayEndTime(calendar).getTime());
        }

        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handKaisen2",
                "手工发送凯森2渠道数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    Map<String, Object> hnbparams = new HashMap<>();
                    hnbparams.put("mobile", userMap.get("mobile").toString());
                   /* List<Map<String, Object>> filterList = kwHnbFilterService.getList(hnbparams);
                    if (filterList != null && filterList.size() > 0) {
                        continue;
                    }*/
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwCyphFilterService.sendKaisen2(userInfo, user);
                    }
                }
            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 推送秒单数据到kaisen2接口
     */
    @ResponseBody
    @RequestMapping("/kaisen3")
    public Result handKaisen3(@RequestParam(value = "createTimeBegin", required = false) String createTimeBegin,
                              @RequestParam(value = "createTimeEnd", required = false) String createTimeEnd,
                              @RequestParam(value = "dayOff", required = false) Integer dayOff) throws Exception {

        if (isEmpty(createTimeBegin) || isEmpty(createTimeEnd)) {
            Calendar calendar = Calendar.getInstance();
            calendar.add(DAY_OF_MONTH, -dayOff);

            createTimeBegin = dateFormat.format(DateUtils.getDayBeginTime(calendar).getTime());
            createTimeEnd = dateFormat.format(DateUtils.getDayEndTime(calendar).getTime());
        }

        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createDateBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createDateEnd", createTimeEnd);
        }
        map.put("phoneIsNotNull", "phoneIsNotNull");

        List<Map<String, Object>> userList = productQualificationService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handKaisen3",
                "手工发送凯森2渠道数据", createTimeBegin, createTimeEnd, "product_qualification", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {

                //判断手机号不要重复
                String mobile = userMap.get("mobile").toString();

                Map<String, Object> params = new HashMap<>();
                params.put("mobile", mobile);
                params.put("channelCode", "kaisen2");

                Integer count = kwCyphFilterService.getCount(params);
                //已传输的记录中没有该号码
                if (count == 0) {
                    User user = new User();
                    user.setId(userMap.get("id").toString());
                    user.setName(userMap.get("name").toString());
                    user.setMobile(userMap.get("mobile").toString());
                    user.setSex(Integer.parseInt(userMap.get("sex").toString()));

                    UserInfo userInfo = new UserInfo();
                    userInfo.setScity(userMap.get("areaName").toString());
                    userInfo.setAreaCode(Integer.parseInt(userMap.get("areaCode").toString()));
                    userInfo.setSalary(Integer.parseInt(userMap.get("salary").toString()));
                    userInfo.setSalaryMethod(Integer.parseInt(userMap.get("salaryMethod").toString()));
                    userInfo.setIp(userMap.get("ip").toString());
                    userInfo.setCredit(Integer.parseInt(userMap.get("credit").toString()));
                    userInfo.setExpectAmount(new BigDecimal(userMap.get("expectAmount").toString()));
                    userInfo.setHouse(Integer.parseInt(userMap.get("house").toString()));
                    userInfo.setCar(Integer.parseInt(userMap.get("car").toString()));
                    userInfo.setSocialSecurity(Integer.parseInt(userMap.get("socialSecurity").toString()));
                    userInfo.setFund(Integer.parseInt(userMap.get("fund").toString()));
                    userInfo.setPolicy(Integer.parseInt(userMap.get("policy").toString()));
                    userInfo.setWxloan(Integer.parseInt(userMap.get("wxloan").toString()));
                    userInfo.setBirthday((Date) userMap.get("birthday"));
                    if (userMap.get("idCard") != null) {
                        userInfo.setIdCard(userMap.get("idCard").toString());
                    }

                    kwCyphFilterService.sendKaisen2(userInfo, user);
                }
            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 巨额贷手工推送
     */
    @ResponseBody
    @RequestMapping("/juedai")
    public Result handJuedai(@RequestParam(value = "createTimeBegin") String createTimeBegin,
                             @RequestParam(value = "createTimeEnd") String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handJuedai",
                "手工发送巨额贷渠道数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    Map<String, Object> hnbparams = new HashMap<>();
                    hnbparams.put("mobile", userMap.get("mobile").toString());
                   /* List<Map<String, Object>> filterList = kwHnbFilterService.getList(hnbparams);
                    if (filterList != null && filterList.size() > 0) {
                        continue;
                    }*/
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwFjsFilterService.sendJuedai(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }




    /**
     * 手工发送收来的数据给新旦
     */
    @ResponseBody
    @RequestMapping("/handmdtxbb")
    public Result handmdtxbb(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                             @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {

        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createDateBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createDateEnd", createTimeEnd);
        }
        map.put("phoneIsNotNull", "phoneIsNotNull");
        try {
            List<Map<String, Object>> userList = productQualificationService.getList(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handmdtxbb",
                    "手工发送收来的数据给新旦", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                    null, null, null);
            if (userList != null && userList.size() > 0) {
                for (Map<String, Object> userMap : userList) {
                    User user = new User();
                    user.setId(userMap.get("id").toString());
                    user.setName(userMap.get("name").toString());
                    user.setMobile(userMap.get("mobile").toString());
                    user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                    user.setUserAgent(UserAgentRandomUtil.random());
                    UserInfo userInfo = new UserInfo();
                    userInfo.setBirthday((Date) userMap.get("birthday"));
                    userInfo.setScity(userMap.get("areaName").toString());
                    if (userMap.get("idCard") != null) {
                        userInfo.setIdCard(userMap.get("idCard").toString());
                    }
                    userInfo.setHouse(Integer.parseInt(userMap.get("house").toString()));
                    userInfo.setCar(Integer.parseInt(userMap.get("car").toString()));
                    userInfo.setPolicy(Integer.parseInt(userMap.get("policy").toString()));
                    userInfo.setExpectAmount(new BigDecimal(userMap.get("expectAmount").toString()));
                    userInfo.setSalary(Integer.parseInt(userMap.get("salary").toString()));
                    userInfo.setIp(userMap.get("ip").toString());
                    kwXbbFilterService.sendXbb(userInfo, user);

                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        return super.setResult(OK, "", codeMsgMap.get(OK));
    }



    /**
     * 手工发送闪借渠道数据
     */
    @ResponseBody
    @RequestMapping("/handShanjie")
    public Result handShanjie(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                              @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handShanjie",
                "手工发送闪借渠道数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwAydFilterService.sendShanjie(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }







    /**
     * 手工发送拍拍贷沉睡用户接口
     */
    @ResponseBody
    @RequestMapping("/handPpdsu")
    public Result handPpdsu(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                            @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handPpdsu",
                "手工发送拍拍贷沉睡用户", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId()) && isNotBlank(userInfo.getIdCard())) {
                        //校验是否有拍拍贷发送成功的记录
                        Map<String, Object> ppdparams = new HashMap<>();
                        ppdparams.put("mobile", userMap.get("mobile").toString());
                        ppdparams.put("interfaceCode", "ppdai");
                        ppdparams.put("code", 1);
                        Integer ppdPushCount = kwPpdPushService.getCount(ppdparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(ppdPushCount)) {
                            continue;
                        }
                        //校验是否有拍拍贷老用户发送成功的记录
                        Map<String, Object> ppdsuparams = new HashMap<>();
                        ppdsuparams.put("mobile", userMap.get("mobile").toString());
                        ppdsuparams.put("interfaceCode", "ppdsu");
                        ppdsuparams.put("code", 1);
                        Integer ppdsuPushCount = kwPpdPushService.getCount(ppdsuparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(ppdsuPushCount)) {
                            continue;
                        }
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwPpdFilterService.sendPpdaiBySleepingUser(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 旧数据
     * 手工发送拍拍贷沉睡用户接口2
     */
    @ResponseBody
    @RequestMapping("/handPpdsu2")
    public Result handPpdsu2(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                             @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handPpdsu2",
                "手工发送拍拍贷沉睡用户2", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId()) && isNotBlank(userInfo.getIdCard())) {
                        //校验是否有拍拍贷发送成功的记录
                        Map<String, Object> ppdparams = new HashMap<>();
                        ppdparams.put("mobile", userMap.get("mobile").toString());
                        ppdparams.put("code", 1);
                        Integer ppdPushCount = kwPpdPushService.getCount(ppdparams);
                        //已有成功发送记录
                        if (!NumberUtil.isNullOrZero(ppdPushCount)) {
                            continue;
                        }
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwPpdFilterService.sendPpdaiBySleepingUser2(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送畅愿保险数据
     */
    @ResponseBody
    @RequestMapping("/handCyis")
    public Result handCyis(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handCyis",
                "手工发送畅愿保险数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    //校验是否有发送黑牛成功的记录
                    Map<String, Object> hnbparams = new HashMap<>();
                    hnbparams.put("mobile", userMap.get("mobile").toString());
                    hnbparams.put("code", 1);
                    Integer hnbpushCount = kwHnbPushService.getCount(hnbparams);
                    if (!NumberUtil.isNullOrZero(hnbpushCount)) {
                        continue;
                    }
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        if (userMap.get("userAgent") == null) {
                            user.setUserAgent(UserAgentRandomUtil.random());
                        } else {
                            user.setUserAgent(userMap.get("userAgent") + "");
                        }
                        userInfo.setCreateDate(new Date());
                        kwCyphFilterService.sendChangYuanInsure(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送所有接口数据(注意有的接口需要生成申请时间)
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handAll")
    public Result handAll(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                          @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd,
                          @RequestParam(value = "channelCode", required = true) String channelCode) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }
            List<Map<String, Object>> userList = userService.getList(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handAll",
                    "手工发送所有接口数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                    null, null, channelCode);
            if (userList != null && userList.size() > 0) {
                for (Map<String, Object> userMap : userList) {
                    String id = userMap.get("id").toString();
                    if (userMap.get("name") != null) {
                        UserInfo userInfo = userInfoService.getByUserId(id);
                        if (userInfo != null && isNotBlank(userInfo.getId())) {
                            User user = new User();
                            user.setId(id);
                            user.setName(userMap.get("name").toString());
                            user.setMobile(userMap.get("mobile").toString());
                            user.setSex(Integer.parseInt(userMap.get("sex").toString()));

                            if ("pinganpuhui".equals(channelCode)) {
                                userInfoService.sendPuHui(userInfo, user);
                            } else if ("pinganzenxian".equals(channelCode)) {
                                userInfoService.sendPingAnZX(userInfo, user);
                            } else if ("dfrz".equals(channelCode)) {
                                kwDfrzFilterService.sendEastFinance(userInfo, user);
                            } else if ("paca".equals(channelCode)) {
                                userInfoService.sendPcac(userInfo, user);
                            } else if ("ycdctc".equals(channelCode)) {
                                kwYcdFilterService.sendZTX(userInfo, user);
                            } else if ("zhudai".equals(channelCode)) {
                                //获取上一天时间
                                long timemillis = DateUtils.getYesRanTime();
                                userInfo.setCreateDate(new Date(timemillis));
                                kwZhudaiFilterService.sendZhuDai(userInfo, user);
                            } else if ("fanggold".equals(channelCode)) {
                                kwFjsFilterService.sendFangGold(userInfo, user);
                            } else if ("houbank".equals(channelCode)) {
                                userInfoService.sendHouBank(userInfo, user);
                            } else if ("xxjr".equals(channelCode)) {
                                kwXxjrFilterService.sendWithMe(userInfo, user);
                            } else if ("xbb".equals(channelCode)) {
                                kwXbbFilterService.sendXbb(userInfo, user);
                            } else if ("xycreditease".equals(channelCode)) {
                                userInfoService.sendXYCreditEase(userInfo, user);
                            } else if ("feidan8".equals(channelCode)) {
                                userInfoService.sendFeidan8(userInfo, user);
                            } else if ("ayd".equals(channelCode)) {
                                kwAydFilterService.sendAnyidai(userInfo, user);
                            } else if ("ayd2".equals(channelCode)) {
                                kwAydFilterService.sendAnyidai2(userInfo, user);
                            } else if ("cyph".equals(channelCode)) {
                                //获取上一天时间
                                long timemillis = DateUtils.getYesRanTime();
                                userInfo.setCreateDate(new Date(timemillis));
                                kwCyphFilterService.sendChangYuanpuhui(userInfo, user);
                            } else if ("ccic".equals(channelCode)) {
                                //获取上一天时间
                                long timemillis = DateUtils.getYesRanTime();
                                userInfo.setCreateDate(new Date(timemillis));
                                kwCcicFilterService.sendCCIC(userInfo, user);
                            } else if ("ycdph".equals(channelCode)) {
                                kwYcdFilterService.sendYCDPH(userInfo, user);
                            } else if ("ppdai".equals(channelCode)) {
                                kwPpdFilterService.sendPpdai(userInfo, user);
                            } else if ("midas".equals(channelCode)) {
                                userInfoService.sendProduct(user, userInfo);
                            } else if ("weidai".equals(channelCode)) {
                                kwWeidaiFilterService.sendWeidai(userInfo, user);
                            }

                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送所有接口异常数据(注意有的接口需要生成申请时间)
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handAllExcetion")
    public Result handAllExcetion(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                  @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd,
                                  @RequestParam(value = "channelCode", required = true) String channelCode) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }
            List<Map<String, Object>> userList = userService.getList(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handAllExcetion",
                    "手工发送所有接口异常数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                    null, null, channelCode);
            if (userList != null && userList.size() > 0) {
                for (Map<String, Object> userMap : userList) {
                    String id = userMap.get("id").toString();
                    if (userMap.get("name") != null) {
                        //查出符合条件的用户
                        Map<String, Object> channelmap = new HashMap<>();
                        if (isNotBlank(createTimeBegin)) {
                            channelmap.put("mobile", userMap.get("mobile").toString());
                        }
                        if (isNotBlank(createTimeEnd)) {
                            channelmap.put("channelCode", channelCode);
                        }
                        List<Map<String, Object>> userchannelList = kwUserChannelService.getList(channelmap);
                        if (userchannelList == null || userchannelList.size() == 0) {
                            UserInfo userInfo = userInfoService.getByUserId(id);
                            if (userInfo != null && isNotBlank(userInfo.getId())) {
                                User user = new User();
                                user.setId(id);
                                user.setName(userMap.get("name").toString());
                                user.setMobile(userMap.get("mobile").toString());
                                user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                                if ("pinganpuhui".equals(channelCode)) {
                                    userInfoService.sendPuHui(userInfo, user);
                                } else if ("pinganzenxian".equals(channelCode)) {
                                    userInfoService.sendPingAnZX(userInfo, user);
                                } else if ("dfrz".equals(channelCode)) {
                                    kwDfrzFilterService.sendEastFinance(userInfo, user);
                                } else if ("paca".equals(channelCode)) {
                                    userInfoService.sendPcac(userInfo, user);
                                } else if ("ycdctc".equals(channelCode)) {
                                    kwYcdFilterService.sendZTX(userInfo, user);
                                } else if ("zhudai".equals(channelCode)) {
                                    //获取上一天时间
                                    long timemillis = DateUtils.getYesRanTime();
                                    userInfo.setCreateDate(new Date(timemillis));
                                    kwZhudaiFilterService.sendZhuDai(userInfo, user);
                                } else if ("fanggold".equals(channelCode)) {
                                    kwFjsFilterService.sendFangGold(userInfo, user);
                                } else if ("houbank".equals(channelCode)) {
                                    userInfoService.sendHouBank(userInfo, user);
                                } else if ("xxjr".equals(channelCode)) {
                                    kwXxjrFilterService.sendWithMe(userInfo, user);
                                } else if ("xxjr2".equals(channelCode)) {
                                    kwXxjrFilterService.sendWithMe2(userInfo, user);
                                } else if ("xbb".equals(channelCode)) {
                                    kwXbbFilterService.sendXbb(userInfo, user);
                                } else if ("xycreditease".equals(channelCode)) {
                                    userInfoService.sendXYCreditEase(userInfo, user);
                                } else if ("feidan8".equals(channelCode)) {
                                    userInfoService.sendFeidan8(userInfo, user);
                                } else if ("ayd".equals(channelCode)) {
                                    kwAydFilterService.sendAnyidai(userInfo, user);
                                } else if ("ayd2".equals(channelCode)) {
                                    kwAydFilterService.sendAnyidai2(userInfo, user);
                                } else if ("cyph".equals(channelCode)) {
                                    //获取上一天时间
                                    long timemillis = DateUtils.getYesRanTime();
                                    userInfo.setCreateDate(new Date(timemillis));
                                    kwCyphFilterService.sendChangYuanpuhui(userInfo, user);
                                } else if ("ccic".equals(channelCode)) {
                                    //获取上一天时间
                                    long timemillis = DateUtils.getYesRanTime();
                                    userInfo.setCreateDate(new Date(timemillis));
                                    kwCcicFilterService.sendCCIC(userInfo, user);
                                } else if ("ycdph".equals(channelCode)) {
                                    kwYcdFilterService.sendYCDPH(userInfo, user);
                                } else if ("ppdai".equals(channelCode)) {
                                    kwPpdFilterService.sendPpdai(userInfo, user);
                                } else if ("ctc".equals(channelCode)) {
                                    userInfoService.sendChinatopcredit(userInfo, user);
                                }

                            }
                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送未发送接口的客户
     *
     * @param idBegin
     * @param idEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handNeverSend")
    public Result handNeverSend(@RequestParam(value = "idBegin", required = true) Integer idBegin,
                                @RequestParam(value = "idEnd", required = true) Integer idEnd,
                                @RequestParam(value = "channelCode", required = true) String channelCode) throws Exception {
        if (idBegin == null || idEnd == null) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (!NumberUtil.isNullOrZero(idBegin)) {
            map.put("idBegin", idBegin);
        }
        if (!NumberUtil.isNullOrZero(idEnd)) {
            map.put("idEnd", idEnd);
        }
        if (isNotBlank(channelCode)) {
            map.put("channelCode", channelCode);
        }
        List<Map<String, Object>> kwUserErrorList = kwUserErrorService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handNeverSend",
                "手工发送未发送接口的客户", null, null, "kw_user_error", kwUserErrorList.size(),
                null, null, channelCode);
        if (kwUserErrorList != null && kwUserErrorList.size() > 0) {
            for (Map<String, Object> kwUserErrorMap : kwUserErrorList) {
                String mobile = kwUserErrorMap.get("mobile").toString();
                //查询用户基础表
                User user = userService.getByMobile(mobile);
                if (user != null && isNotBlank(user.getId())) {
                    UserInfo userInfo = userInfoService.getByUserId(user.getId());
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        userInfoService.sendChannel(user, userInfo);
                    }
                } else {
                    logger.error("无此电话号的用户" + mobile);
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    //由出生日期获得年龄
    public int getAge(Date birthDay) throws Exception {
        Calendar cal = Calendar.getInstance();

        if (cal.before(birthDay)) {
            throw new IllegalArgumentException(
                    "The birthDay is before Now.It's unbelievable!");
        }
        int yearNow = cal.get(YEAR);
        int monthNow = cal.get(MONTH);
        int dayOfMonthNow = cal.get(DAY_OF_MONTH);
        cal.setTime(birthDay);

        int yearBirth = cal.get(YEAR);
        int monthBirth = cal.get(MONTH);
        int dayOfMonthBirth = cal.get(DAY_OF_MONTH);

        int age = yearNow - yearBirth;

        if (monthNow <= monthBirth) {
            if (monthNow == monthBirth) {
                if (dayOfMonthNow < dayOfMonthBirth) age--;
            } else {
                age--;
            }
        }
        return age;
    }


    /**
     * 手工删除接口多余数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handDelHnb")
    public Result handDelHnb(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                             @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }


            List<Map<String, Object>> filterList = kwHnbFilterService.getList(map);

            kwOperationLogService.addOperationLog("1", " 推送渠道", "handDelHnb",
                    "手工删除黑牛宝接口多余数据", createTimeBegin, createTimeEnd, "filter", filterList.size(),
                    null, null, null);
            if (filterList != null && filterList.size() > 0) {
                for (Map<String, Object> userMap : filterList) {
                    //删除filter多余数据
                    String mobile = userMap.get("mobile").toString();
                    Map<String, Object> filterParam = new HashMap<>();
                    filterParam.put("mobile", mobile);
                    List<Map<String, Object>> filtersList = kwHnbFilterService.getList(filterParam);
                    if (filtersList.size() > 1) {
                        for (int i = 0; i < filtersList.size(); i++) {
                            if (i > 0) {
                                kwHnbFilterService.delete(filtersList.get(i).get("id").toString());
                            }
                        }
                    }
                    //删除push多余数据
                    List<Map<String, Object>> pushList = kwHnbPushService.getList(filterParam);
                    if (pushList.size() > 1) {
                        for (int i = 0; i < pushList.size(); i++) {
                            if (i > 0) {
                                kwHnbPushService.delete(pushList.get(i).get("id").toString());
                            }
                        }
                    }
                    //删除pushlog多余数据
                    List<Map<String, Object>> pushlogList = kwHnbPushLogService.getList(filterParam);
                    if (pushlogList.size() > 1) {
                        for (int i = 0; i < pushlogList.size(); i++) {
                            if (i > 0) {
                                kwHnbPushLogService.delete(pushlogList.get(i).get("id").toString());
                            }
                        }
                    }

                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工删除新旦多余数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/hanDelXbb")
    public Result handDelXbb(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                             @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        try {
            if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
                return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
            }
            //查出符合条件的用户
            Map<String, Object> map = new HashMap<>();
            if (isNotBlank(createTimeBegin)) {
                map.put("createTimeBegin", createTimeBegin);
            }
            if (isNotBlank(createTimeEnd)) {
                map.put("createTimeEnd", createTimeEnd);
            }


            List<Map<String, Object>> filterList = kwXbbFilterService.getList(map);
            kwOperationLogService.addOperationLog("1", " 推送渠道", "handDelXbb",
                    "手工删除新旦接口多余数据", createTimeBegin, createTimeEnd, "filter", filterList.size(),
                    null, null, null);
            if (filterList != null && filterList.size() > 0) {
                for (Map<String, Object> userMap : filterList) {
                    String mobile = userMap.get("mobile").toString();
                    Map<String, Object> filterParam = new HashMap<>();
                    filterParam.put("mobile", mobile);
                    List<Map<String, Object>> filtersList = kwXbbFilterService.getList(filterParam);
                    if (filtersList.size() > 1) {
                        for (int i = 0; i < filtersList.size(); i++) {
                            if (i > 0) {
                                kwXbbFilterService.delete(filtersList.get(i).get("id").toString());
                            }
                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    @ResponseBody
    @RequestMapping("/sendproduct")
    public void sendProduct(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                            @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                if (userMap.get("name") != null) {
                    String id = userMap.get("id").toString();
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        logger.info("补发秒单:{}", userMap.get("mobile").toString());
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        userInfoService.sendProduct(user, userInfo);
                    }
                }
            }
        }
    }


    /**
     * 手工发送熠巨网数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handYiJu")
    public Result handYiJu(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                           @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handYiJu",
                "手工发送熠巨网数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwFjsFilterService.sendYiJu(userInfo, user);
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


    /**
     * 手工发送熠巨网方正数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handYiJuFz")
    public Result handYiJuFz(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                             @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handYiJuFz",
                "手工发送熠巨网方正数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        /*String areaCode = userInfo.getAreaCode() + "";
                        String regEx = "^[3][7]\\d{4}$";
                        boolean isMatch = Pattern.matches(regEx, areaCode);
                        if(isMatch) {*/
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwFjsFilterService.sendYiJuFz(userInfo, user);
                        // }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }

    /**
     * 手工发送熠巨网方正数据
     *
     * @param createTimeBegin
     * @param createTimeEnd
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping("/handOldYiJuFz")
    public Result handOldYiJuFz(@RequestParam(value = "createTimeBegin", required = true) String createTimeBegin,
                                @RequestParam(value = "createTimeEnd", required = true) String createTimeEnd) throws Exception {
        if (isBlank(createTimeBegin) || isBlank(createTimeEnd)) {
            return setResult(MISSING_ARGUMENT, null, codeMsgMap.get(MISSING_ARGUMENT));
        }
        //查出符合条件的用户
        Map<String, Object> map = new HashMap<>();
        if (isNotBlank(createTimeBegin)) {
            map.put("createTimeBegin", createTimeBegin);
        }
        if (isNotBlank(createTimeEnd)) {
            map.put("createTimeEnd", createTimeEnd);
        }
        List<Map<String, Object>> userList = userService.getList(map);
        kwOperationLogService.addOperationLog("1", " 推送渠道", "handYiJuFz",
                "手工发送熠巨网方正数据", createTimeBegin, createTimeEnd, "kw_user", userList.size(),
                null, null, null);
        if (userList != null && userList.size() > 0) {
            for (Map<String, Object> userMap : userList) {
                String id = userMap.get("id").toString();
                if (userMap.get("name") != null) {
                    UserInfo userInfo = userInfoService.getByUserId(id);
                    if (userInfo != null && isNotBlank(userInfo.getId())) {
                        /*String areaCode = userInfo.getAreaCode() + "";
                        String regEx = "^[3][7]\\d{4}$";
                        boolean isMatch = Pattern.matches(regEx, areaCode);
                        if(isMatch) {*/
                        User user = new User();
                        user.setId(id);
                        user.setName(userMap.get("name").toString());
                        user.setMobile(userMap.get("mobile").toString());
                        user.setSex(Integer.parseInt(userMap.get("sex").toString()));
                        kwFjsFilterService.sendOldYiJuFz(userInfo, user);
                        // }
                    }
                }

            }
        }
        return super.setResult(OK, "", codeMsgMap.get(OK));
    }


}
